<#include "./template/general_temp.ftl">

<#macro content>
<div class="row">
    <div class="box col-md-12">
        <div class="box-inner">
            <div class="box-header well" data-original-title="">
                <h2><i class="glyphicon glyphicon-user"></i>轮播图设置</h2>

                <div class="box-icon">
                    <a href="#" class="btn btn-setting btn-round btn-default"><i
                            class="glyphicon glyphicon-cog"></i></a>
                    <a href="#" class="btn btn-minimize btn-round btn-default"><i
                            class="glyphicon glyphicon-chevron-up"></i></a>
                    <a href="#" class="btn btn-close btn-round btn-default"><i
                            class="glyphicon glyphicon-remove"></i></a>
                </div>
            </div>
            <div class="box-content">
                <@form.form modelAttribute="editBannerCommand" role="form">
                    <div>
                        <h1>首页轮播图设置<span style="color:red;">链接请以"http://或https://开头"</span></h1>

                        <div class="form-group">
                            <label>第一幅</label>
                            <@form.hidden path="home_banner_img_1" id="home_banner_img_1"/>
                            <span class="home_banner" id="home_banner_img_blk_1">
                            <#if editBannerCommand.home_banner_img_1?? && editBannerCommand.home_banner_img_1 != "">
                                图片：<img style='width:200px;' src='${base}/system/getImg?imgId=${editBannerCommand.home_banner_img_1}'/>
                            </#if>
                            </span>
                            <input data-no-uniform="true" type="file" id="imgSel1"
                                   class="file_upload"/>                            链接：<@form.input path="home_banner_url_1"/>
                            标题：<@form.input path="home_banner_title_1"/>
                        </div>
                        <div class="form-group">
                            <label>第二幅</label>
                            <@form.hidden path="home_banner_img_2" id="home_banner_img_2"/>
                            <span class="home_banner" id="home_banner_img_blk_2">
                                <#if editBannerCommand.home_banner_img_2?? && editBannerCommand.home_banner_img_2 != "">
                                    图片：<img style='width:200px;' src='${base}/system/getImg?imgId=${editBannerCommand.home_banner_img_2}'/>
                                </#if>
                        </span>
                            <input data-no-uniform="true" type="file" id="imgSel2"
                                   class="file_upload"/>                            链接：<@form.input path="home_banner_url_2"/>
                            标题：<@form.input path="home_banner_title_2"/>
                        </div>
                        <div class="form-group">
                            <label>第三幅</label>
                            <@form.hidden path="home_banner_img_3" id="home_banner_img_3"/>
                            <span class="home_banner" id="home_banner_img_blk_3">
                                <#if editBannerCommand.home_banner_img_3?? && editBannerCommand.home_banner_img_3 != "">
                                    图片：<img style='width:200px;' src='${base}/system/getImg?imgId=${editBannerCommand.home_banner_img_3}'/>
                                </#if>
                        </span>
                            <input data-no-uniform="true" type="file" id="imgSel3"
                                   class="file_upload"/>                            链接：<@form.input path="home_banner_url_3"/>
                            标题：<@form.input path="home_banner_title_3"/>
                        </div>
                        <div class="form-group">
                            <label>第四幅</label>
                            <@form.hidden path="home_banner_img_4" id="home_banner_img_4"/>
                            <span class="home_banner" id="home_banner_img_blk_4">
                                <#if editBannerCommand.home_banner_img_4?? && editBannerCommand.home_banner_img_4 != "">
                                    图片：<img style='width:200px;' src='${base}/system/getImg?imgId=${editBannerCommand.home_banner_img_4}'/>
                                </#if>
                        </span>
                            <input data-no-uniform="true" type="file" id="imgSel4"
                                   class="file_upload"/>                            链接：<@form.input path="home_banner_url_4"/>
                            标题：<@form.input path="home_banner_title_4"/>
                        </div>
                    </div>
                    <div>
                        <h1>活动轮播图设置</h1>

                        <div class="form-group">
                            <label>第一幅</label>
                            <@form.hidden path="activity_banner_img_1" id="activity_banner_img_1"/>
                            <span class="home_banner" id="activity_banner_img_blk_1">
                                <#if editBannerCommand.activity_banner_img_1?? && editBannerCommand.activity_banner_img_1 != "">
                                    图片：<img style='width:200px;' src='${base}/system/getImg?imgId=${editBannerCommand.activity_banner_img_1}'/>
                                </#if>
                        </span>
                            <input data-no-uniform="true" type="file" id="imgSel_h_1"
                                   class="file_upload"/>                            链接：<@form.input path="activity_banner_url_1"/>
                        </div>
                        <div class="form-group">
                            <label>第二幅</label>
                            <@form.hidden path="activity_banner_img_2" id="activity_banner_img_2"/>
                            <span class="home_banner" id="activity_banner_img_blk_2">
                                <#if editBannerCommand.activity_banner_img_2?? && editBannerCommand.activity_banner_img_2 != "">
                                    图片：<img style='width:200px;' src='${base}/system/getImg?imgId=${editBannerCommand.activity_banner_img_2}'/>
                                </#if>
                        </span>
                            <input data-no-uniform="true" type="file" id="imgSel_h_2"
                                   class="file_upload"/>                            链接：<@form.input path="activity_banner_url_2"/>
                        </div>
                        <div class="form-group">
                            <label>第三幅</label>
                            <@form.hidden path="activity_banner_img_3" id="activity_banner_img_3"/>
                            <span class="home_banner" id="activity_banner_img_blk_3">
                                <#if editBannerCommand.activity_banner_img_3?? && editBannerCommand.activity_banner_img_3 != "">
                                    图片：<img style='width:200px;' src='${base}/system/getImg?imgId=${editBannerCommand.activity_banner_img_3}'/>
                                </#if>
                        </span>
                            <input data-no-uniform="true" type="file" id="imgSel_h_3"
                                   class="file_upload"/>                            链接：<@form.input path="activity_banner_url_3"/>
                        </div>
                        <div class="form-group">
                            <label>第四幅</label>
                            <@form.hidden path="activity_banner_img_4" id="activity_banner_img_4"/>
                            <span class="home_banner" id="activity_banner_img_blk_4">
                                <#if editBannerCommand.activity_banner_img_4?? && editBannerCommand.activity_banner_img_4 != "">
                                    图片：<img style='width:200px;' src='${base}/system/getImg?imgId=${editBannerCommand.activity_banner_img_4}'/>
                                </#if>
                            </span>
                            <input data-no-uniform="true" type="file" id="imgSel_h_4"
                                   class="file_upload"/>                           链接： <@form.input path="activity_banner_url_4"/>
                        </div>
                        <h1>广告图设置</h1>
                        <div class="form-group">
                            <@form.hidden path="ad_banner_img_1" id="ad_banner_img_1"/>
                            <span class="home_banner" id="ad_banner_img_blk_1">
                                <#if editBannerCommand.ad_banner_img_1?? && editBannerCommand.ad_banner_img_1 != "">
                                    图片：<img style='width:200px;' src='${base}/system/getImg?imgId=${editBannerCommand.ad_banner_img_1}'/>
                                </#if>
                            </span>
                            <input data-no-uniform="true" type="file" id="imgSel_ad_1"
                                   class="file_upload"/>
                            链接：<@form.input path="ad_banner_url_1"/>
                        </div>
                    </div>
                    <button type="submit">保存</button>
                </@form.form>
            </div>
        </div>
    </div>
    <!--/span-->

</div><!--/row-->
</#macro>

<#macro script>
<style type="text/css">
    .home_banner {
        width: 300px;
        height: 90px;
        border: 1px dashed #7C7C7C;
    }
</style>
<script type="text/javascript">
    $(document).ready(function () {
    ${home}
    ${activity}
    ${ad}
    });
</script>
</#macro>
